# 
# Created with PyCharm.
# Description :
# User: jiume
# Date: 2024-12-11
# Time: 8:01
#

# class A():
#     pass
#
# a = A()
# b = a
# print(a)
# print(b)


# class Person():
#     def __init__(self,name,dog):
#         self.name = name
#         self.dog = dog
#
# class Dog():
#     def __init__(self, name, age):
#         self.name = name
#         self.age = age
#
#     def show(self):
#         print(f'我叫{self.name},今年{self.age}岁了')
#
# dog = Dog('小狗',3)
# person1 = Person('小明',dog)
# # person2 指向了 person1 所指向的对象
# person2 = person1
# print(f'person1.dog == person2.dog?{person1.dog == person2.dog}')
# # 修改 person2 所指向的dog的属性
# person2.dog.name = '大白'
# # 再打印person1 与 person2 的pet
# person1.dog.show()
# person2.dog.show()
# # 此时把 person1 所指向的对象 拷贝一份 赋值给 person2(这里不是变量赋值，而是对象赋值)
# import copy # 导包
# # person2 = copy.copy(person1)
# person2 = copy.deepcopy(person1)
# print(f'person1.dog == person2.dog吗?{person1.dog == person2.dog}')
# # 再修改 person2 所指向的dog的属性
# person2.dog.name = '小猫'
# # person2.name = 'xiao'
# # print(person2.name)
# # print(person1.name)
# # 再打印person1 与 person2 的pet
# person1.dog.show()
# person2.dog.show()


# class Circle():
#     def __init__(self, r):
#         self.r = r
#
#     def get_area(self):
#         print(f'圆的面积:{3.14 * (self.r ** 2)}')
#
#     def get_perimeter(self):
#         print(f'圆的周长:{2 * 3.14 * self.r}')
#
# r = int(input('请输入圆的半径:'))
# c = Circle(r)
# c.get_area()
# c.get_perimeter()


# class Student():
#     def __init__(self,name,age,gender,score):
#         self.name = name
#         self.age = age
#         self.gender = gender
#         self.score = score
#
#     def info(self):
#         print(f'{self.name,self.age,self.gender,self.score}')
#
# lst = []
# for i in range(5):
#     print(f'请输入{i+1}位学生信息及成绩:',end='')
#     l = input().split('#')
#     stu = Student(l[0], int(l[1]), l[2],int(l[3]))
#     lst.append(stu)
#
# for i in lst:
#     i.info()


# class Instrument():
#     def make_sound(self):
#         pass
#
# class Erhu(Instrument):
#     def make_sound(self):
#         print('二胡在弹奏')
#
# class Piano(Instrument):
#     def make_sound(self):
#         print('钢琴在演奏')
#
# class Violin(Instrument):
#     def make_sound(self):
#         print('小提琴在演奏')
#
# def play(instrument):
#     instrument.make_sound()
#
# play(Erhu())
# play(Piano())
# play(Violin())


# class Car():
#     def __init__(self,sort,port):
#         self.sort = sort
#         self.port = port
#
#     def start(self):
#         pass
#
#     def quit(self):
#         pass
#
# class Taxi(Car):
#     def __init__(self,sort,port,company):
#         super().__init__(sort,port)
#         self.company = company
#
#     def start(self):
#         print('乘客您好！')
#         print(f'我是{self.company}的，我的车牌是:{self.port},你要去哪里?')
#
#     def quit(self):
#         print('目的地到了，请您付款下车，欢迎下次乘坐')
#
# class FamilyCar(Car):
#     def __init__(self, sort, port, name):
#         super().__init__(sort, port)
#         self.name = name
#
#     def start(self):
#         print(f'我是{self.name}，我的汽车我做主')
#
#     def quit(self):
#         print('目的地到了，我们去玩儿吧')
#
# taxi = Taxi('长城','京A88888','长城出租车公司')
# family_car = FamilyCar('长城','京A88888','武大郎')
#
# taxi.start()
# taxi.quit()
# print('='*30)
# family_car.start()
# family_car.quit()